! ###########################################################################
!
! Copyright 2014, Regents of the University of Colorado. All right reserved.
! Use and duplication is permitted under the terms of the
! BSD 3-Clause License: https://opensource.org/licenses/BSD-3-Clause
!
! ###########################################################################

MODULE MOD_COSP_RTTOVSTUB
  USE COSP_KINDS, ONLY: wp
  IMPLICIT NONE

CONTAINS
  SUBROUTINE RTTOV_MULTPROF(nch_in,ichan_in,surfem_in,prf_num_in,nlevels_in, &
       plat_in,sat_in,sens_in,zenang_in, p_in,t_in,q_in,o3_in,co2_in,ch4_in,  &
       n2o_in,co_in,h_surf,u_surf,v_surf,t_skin,p_surf,t_surf,q_surf,lsmask,  &
       latitude,tbs)
    
    integer  :: prf_num_in
    integer  :: nlevels_in
    integer  :: nch_in                                   ! Number of channels to be computed
    integer  :: plat_in                                  ! Satellite platform
    integer  :: sat_in                                   ! Satellite number
    integer  :: sens_in                                  ! Satellite sensor
    real(Wp) :: zenang_in                                ! Satellite zenith angle
    real(Wp) :: co2_in                                   ! Carbon dioxide 
    real(Wp) :: ch4_in                                   ! methane 
    real(Wp) :: n2o_in                                   ! n2o 
    real(Wp) :: co_in                                    ! carbon monoxide
    real(Wp),dimension(nch_in)               :: surfem_in! Surface emissivities for the channels
    integer,dimension(nch_in)                :: ichan_in ! Indices of selected channels 
    real(Wp),dimension(prf_num_in)           :: h_surf, &! Surface height
                                                u_surf, &! U component of surface wind
                                                v_surf, &! V component of surface wind
                                                t_skin, &! Surface skin temperature
                                                p_surf, &! Surface pressure
                                                t_surf, &! 1.5 m Temperature
                                                q_surf, &! 1.5 m Specific humidity
                                                lsmask, &! land-sea mask
                                                latitude ! Latitude
    real(Wp),dimension(prf_num_in, nch_in)   :: tbs      ! Tbs (in the right format)
    real(Wp),dimension(prf_num_in,nlevels_in):: p_in,   &! Pressure profiles  
                                                t_in,   &! Temperature profiles
                                                q_in,   &! Humidity profiles
                                                o3_in    ! Ozone profiles 
  END SUBROUTINE RTTOV_MULTPROF
END MODULE MOD_COSP_RTTOVSTUB
